package com.douqu.game.core.factory;

/**
 * Author : Bean
 * 2017-06-19 16:34
 */
public class CodeFactory {

    public final static boolean TEST = true;

    /** 战斗服务器向主服务器获取初始数据 */
    public final static int GET_BATTLE_SERVER_PORT = 11;

    /** 告诉主服务器战斗服务器启动了 */
    public final static int START_BATTLE_TCP_SERVER = 12;

    /** 战斗初始化 */
    public final static int BATTLE_INIT = 13;

    /** 热更新服务器代码 */
    public final static int UPDATE_CLASS = 14;

    /** 加载配置文件 */
    public final static int LOAD_DATA = 15;

    /** 更新测试配置  */
    public final static int UPDATE_LOG_CONFIG = 16;

    /** 发送公告 */
    public final static int SEND_NOTICE = 17;

    /** 同步战斗数据 */
    public final static int BATTLE_DATA = 18;

    /**
     * 战斗服务器PING主服务器
     */
    public final static int BATTLE_PING_MAIN = 19;

    /**
     * 玩家离线
     */
    public final static int PLAYER_OFFLINE = 20;

    /**
     * 对话框信息
     */
    public final static int PLAYER_SYSTEM = 21;


    /**
     * 获取主服务器的RMI地址
     */
    public final static int ACTIVITY_SERVER_INIT = 51;

    /**
     * 报名跨服阵营战成功
     */
    public final static int ACTIVITY_CAMP_APPLY_SUCCESS = 52;

    /**
     * 阵营战匹配成功
     */
    public final static int ACTIVITY_CAMP_MATCH_SUCCESS = 53;

    /**
     * 通知各自的主服务器可以连接战斗服务器了
     */
    public final static int ACTIVITY_CAMP_START_BATTLE = 54;

    /**
     * 活动状态
     */
    public final static int ACTIVITY_CAMP_STATUS = 55;

    /**
     * 通知排行
     */
    public final static int ACTIVITY_CAMP_RANK_INFO = 56;

    /**
     * 通知阵营活动的时间
     */
    public final static int ACTIVITY_CAMP_TIME = 57;


    /**
     * 服务器之间的PING
     */
    public final static int SERVER_PING = 98;

    /** 关闭主服务器 */
    public final static int CLOSE_MAIN_SERVER = 99;

    /** 这个值以下的都是服务器之间的通信接口 */
    public final static int SERVER_MSG_MAX = 100;



    /************************************GM接口********************************************************************/
    public final static int GM_LOGIN                = 0x00101;

    public final static int GM_LOGOUT               = 0x00102;
    /**
     * 顶号
     */
    public final static int GM_LOGIN_OTHER          = 0x00103;



    public final static int GM_PLAYER = 0x00200;

    public final static int GM_PLAYER_BASE_INFO     = 0x00201;

    public final static int GM_PLAYER_EXT_INFO      = 0x00202;

    public final static int GM_PLAYER_OPTION        = 0x00203;

    public final static int GM_PLAYER_ONLINE        = 0x00204;

    public final static int GM_PLAYER_ALL           = 0x00205;

    public final static int GM_PLAYER_MAIL_SEND     = 0x00206;

    public final static int GM_PLAYER_MAIL_REMOVE   = 0x00207;

    public final static int GM_PLAYER_RECHARGE      = 0x00208;

    public final static int GM_PLAYER_CLEAR         = 0x00209;

    public final static int GM_PLAYER_RANK          = 0x00210;
    /** 导出所有玩家 */
    public final static int GM_PLAYER_EXPORT        = 0x00211;
    /** 玩家天赋列表 */
    public final static int GM_PLAYER_TALENT_LIST   = 0x00212;


    public final static int GM_SYSTEM = 0x00300;

    public final static int GM_SYSTEM_NOTICE_LIST   = 0x00301;

    public final static int GM_SYSTEM_NOTICE_SEND   = 0x00302;

    public final static int GM_SYSTEM_MAIL_GROUP    = 0x00303;
    /** 更新对象配置 */
    public final static int GM_SYSTEM_OBJECT_CONFIG = 0x00304;
    /** 系统配置 */
    public final static int GM_SYSTEM_SERVER_CONFIG = 0x00305;
    /** 其它配置 */
    public final static int GM_SYSTEM_OTHER_CONFIG  = 0x00306;

    public final static int GM_SYSTEM_SERVER_LIST   = 0x00307;

    public final static int GM_SYSTEM_SERVER_TEST   = 0x00308;

    public final static int GM_SYSTEM_CONFIG_TASK   = 0x00309;

    /** 超级神指令(针对整个游戏的) */
    public final static int GM_SYSTEM_SUPER_CMD     = 0x00310;
    /** GM聊天 */
    public final static int GM_SYSTEM_CHAT          = 0x00311;
    /** 更新对象本地配置 */
    public final static int GM_SYSTEM_LOCAL_CONFIG  = 0x00312;
    /** 更新platform文件*/
    public final static int GM_SYSTEM_PLATFORM      = 0x00313;
    /** 修复机器人相关 */
    public final static int GM_SYSTEM_FIX_ROBOT     = 0x00314;

    public final static int GM_SYSTEM_CHECK_CAMP    = 0x00315;

    public final static int GM_SYSTEM_NOTICE_DEL    = 0x00316;





    public final static int GM_ACCOUNT = 0x00400;

    public final static int GM_ACCOUNT_LIST         = 0x00401;

    public final static int GM_ACCOUNT_ADD          = 0x00402;

    public final static int GM_ACCOUNT_UPDATE       = 0x00403;

    public final static int GM_ACCOUNT_OPTION_LOG   = 0x00404;
    /** 在线GM列表 */
    public final static int GM_ACCOUNT_ONLINE_LIST  = 0x00405;
    /** GM对GM聊天 */
    public final static int GM_ACCOUNT_CHAT         = 0x00406;




    public final static int GM_DATA = 0x00500;

    public final static int GM_DATA_BATTLE_LIST     = 0x00501;

    public final static int GM_DATA_BATTLE_DETAIL   = 0x00502;

    public final static int GM_DATA_FEEDBACK_LIST   = 0x00503;

    public final static int GM_DATA_BOSS_LIST       = 0x00504;
    /** GM获取拍卖行拍卖列表*/
    public final static int GM_DATA_AUCTION_LIST    = 0x00505;
    /** GM获取拍卖某条详情*/
    public final static int GM_DATA_AUCTION_DETAIL  = 0x00506;

    public final static int GM_DATA_MAP_CITY_LIST   = 0x00507;

    public final static int GM_DATA_MAP_CITY_DETAIL = 0x00508;

    public final static int GM_DATA_FEEDBACK_EXPORT = 0x00509;




    public final static int GM_ERROR                = 0x00901;

    /** GM合服准备接口 */
    public final static int GM_MERGE_ALL            = 0x01001;
    /** GM合服拍卖行处理 */
    public final static int GM_MERGE_AUCTION        = 0x01002;


    public final static String PLAYER_CARD_DETAIL    = "cardDetail";
    public final static String PLAYER_TASK_INFO      = "taskInfo";
    public final static String PLAYER_MAP_INFO       = "mapInfo";
    public final static String PLAYER_CAMP_INFO      = "campInfo";
    public final static String PLAYER_BOON_INFO      = "boonInfo";
    public final static String PLAYER_CHALLENGE_INFO = "challengeInfo";
    public final static String PLAYER_IN_OUT_LOG     = "inOutLog";


    public final static String GM_OPTION_OTHER        = "other";
    public final static String GM_OPTION_ADD_PROP     = "addProp";
    public final static String GM_OPTION_ADD_ASSET    = "addAsset";
    public final static String GM_OPTION_ADD_CARD     = "addCard";
    public final static String GM_OPTION_ADD_MONEY    = "addMoney";
    public final static String GM_OPTION_ADD_EXP      = "addExp";
    public final static String GM_OPTION_INVINCIBLE   = "invincible";
    public final static String GM_OPTION_JUMP_GUIDE   = "jumpGuide";
    public final static String GM_OPTION_OFFLINE      = "offline";
    public final static String GM_OPTION_FORBID       = "forbid";

    public final static String PLATFORM_QUERY_ALL     = "platformQueryAll";
    public final static String PLATFORM_QUERY_TENPAY  = "platformQueryTenpay";
    public final static String PLATFORM_QUERY_ALIPAY  = "platformQueryAlipay";
    public final static String PLATFORM_QUERY_OTHER   = "platformQueryOther";
    public final static String PLATFORM_UPDATE_ALL    = "platformUpdateAll";
    public final static String PLATFORM_UPDATE_TENPAY = "platformUpdateTenpay";
    public final static String PLATFORM_UPDATE_ALIPAY = "platformUpdateAlipay";
    public final static String PLATFORM_UPDATE_OTHER  = "platformUpdateOther";


    public final static String CMD_CREATE_BOSS    = "createBoss";
    public final static String CMD_CREATE_ROBOT   = "createRobot";
    public final static String CMD_UPDATE_CLASS   = "updateClass";
    public final static String CMD_UPDATE_WHITE   = "updateWhite";



    public static final String QUERY_TYPE_NICK_NAME = "queryNickName";

//    public static final String QUERY_TYPE_UID = "queryUid";

    public static final String QUERY_TYPE_OBJECT_INDEX = "queryObjectIndex";



    /**********************************路线服务器**********************************************************************/

    public final static int ROUTE_GET_PATH = 0x00101;

    public static boolean isServer(int code)
    {
        return code <= SERVER_MSG_MAX;
    }






    /**********************************KEY值**********************************************************************/

    public final static String KEY_BATTLE_ID = "battleId";

    public final static String KEY_BATTLE_TYPE = "battleType";

    public final static String KEY_BATTLE_DETAIL_TYPE = "battleDetailType";

    public final static String KEY_BATTLE_SERVER_HOST = "battleServerHost";

    public final static String KEY_BATTLE_SERVER_PORT = "battleServerPort";

    public final static String KEY_TARGET = "target";

    public final static String KEY_PLAYER_INDEX = "playerIndex";

    public final static String KEY_TARGET_INDEX = "targetIndex";

    public final static String KEY_PLAYER_FC = "playerFC";

    public final static String KEY_PLAYER_SERVER_ID = "playerServerId";

    public final static String KEY_TARGET_SERVER_ID = "targetServerId";

    public final static String KEY_TARGET_FC = "targetFC";

    public final static String KEY_TARGET_NAME = "targetName";

    public final static String KEY_PARAM = "param";

    public final static String KEY_TEAM_INDEX = "teamIndex";

    public final static String KEY_FLAG = "flag";

    public final static String KEY_FREE = "free";

    public final static String KEY_RESULT = "result";

    public final static String KEY_INDEX = "index";

    public final static String KEY_STATUS = "status";

    public final static String KEY_RUNNING = "running";

    public final static String KEY_START_TIME = "startTime";

    public final static String KEY_TOTAL_TIME = "totalTime";

    public final static String KEY_INTERVAL_TIME = "intervalTime";


    public static void main(String[] args) {

        String a = Integer.toHexString(GM_MERGE_ALL);
        int b = Integer.parseInt(a);

        System.out.println(b/100);
    }
}
